<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>相册管理</title>
    <link href="../static/images/favicon.ico" th:href="@{/favicon.ico}" rel="icon" type="image/x-ico">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
    <link rel="stylesheet" href="../../static/css/me.css" th:href="@{/css/me.css}">
</head>
<body>

<!--导航-->
<nav th:fragment="menu(n)" class="ui inverted attached segment m-padded-tb-mini m-shadow-small">
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui teal header item">Cenの客栈-后台</h2>
            <a href="#" th:href="@{/admin/blogs}" class=" m-item item m-mobile-hide"
               th:classappend="${n==1} ? 'active'"><i class=" home icon"></i>文章管理</a>
            <a href="#" th:href="@{/admin/types}" class=" m-item item m-mobile-hide"
               th:classappend="${n==2} ? 'active'"><i class=" list icon"></i>分类管理</a>
            <a href="#" th:href="@{/admin/tags}" class="m-item item m-mobile-hide"
               th:classappend="${n==3} ? 'active'"><i class=" tags icon"></i>标签管理</a>
            <a href="#" th:href="@{/admin/pictures}" class="m-item item m-mobile-hide"
               th:classappend="${n==4} ? 'active'"><i class=" heart icon"></i>相册管理</a>
            <a href="#" th:href="@{/admin/websiteInfo}" class="m-item item m-mobile-hide"
               th:classappend="${n==5} ? 'active'"><i class=" setting icon"></i>网站设置</a>
            <div class="right m-item m-mobile-hide menu">
                <div class="ui dropdown  item">
                    <div class="text">
                        <img class="ui avatar image" src="https://unsplash.it/100/100?image=1005"
                             th:src="@{${session.user.avatar}}">
                        <span th:text="${session.user.nickname}">Cen部长</span>
                    </div>
                    <i class="dropdown icon"></i>
                    <div class="menu">
                        <a href="#" th:href="@{/admin/logout}" class="item">注销</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
        <i class="sidebar icon"></i>
    </a>
</nav>

<div class="m-padded-tb-hugex">
    <div class="ui attached pointing menu">
        <div class="ui container">
            <div class="right menu">
                <a href="#" th:href="@{/admin/pictures/input}" class="item">新增</a>
                <a href="#" th:href="@{/admin/pictures}" class="teal active item">列表</a>
            </div>
        </div>
    </div>
</div>

<!--中间内容-->
<div class="m-padded-tb-big">
    <div class="ui container">
        <!--消息提示-->
        <div class="ui success message" th:unless="${#strings.isEmpty(message)}">
            <i class="close icon"></i>
            <div class="" th:text="|提示： ${message}">提示：恭喜，操作成功！</div>
        </div>
        <table class="ui compact teal table">
            <thead>
            <tr align="center">
                <th>ID</th>
                <th>图片名称</th>
                <th>时间地点</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr align="center" th:each="picture,iterStat : ${page.content}">
                <td th:text="${iterStat.count}">1</td>
                <td th:text="${picture.picturename}">东西冲徒步</td>
                <td th:text="${picture.picturetime}">2019年12月31日 深圳</td>
                <td>
                    <a href="#" th:href="@{/admin/pictures/{id}/input(id=${picture.id})}"
                       class="ui mini teal basic button">编辑</a>
                    <a href="#" th:href="@{/admin/pictures/{id}/delete(id=${picture.id})}"
                       class="ui mini red basic button">删除</a>
                </td>
            </tr>
            </tbody>
            <tfoot>
            <tr>
                <th colspan="6">
                    <div class="ui mini pagination menu" th:if="${page.totalPages}>1">
                        <a th:href="@{/admin/pictures(page=${page.number}-1)}" class="item">上一页</a>
                        <a th:href="@{/admin/pictures(page=${page.number}+1)}" class="item">下一页</a>
                    </div>
                    <a href="#" th:href="@{/admin/pictures/input}"
                       class="ui mini right floated teal basic button">新增</a>
                </th>
            </tr>
            </tfoot>
        </table>
    </div>
</div>

<br>
<br>
<!--底部-->
<footer th:fragment="footer" class="ui inverted vertical segment m-padded-tb-massive">
    <div class="ui center aligned container">
        <h3 class="item">部落浏览量 : <span th:text="${session.views}" class="item m-text-thin"></span></h3>
        <h3 class="item">&nbsp;&nbsp;&nbsp;部落已持续运行时间:<span id="htmer_time" class="item m-text-thin"></span> &nbsp;&nbsp;&nbsp;
        </h3>
        <br><br>
        <div class="ui inverted divided stackable grid">
            <!--微信二维码
            <div class="four wide column">
                <div class="ui inverted link list">
                    <a class="item" href="#"><img th:src="@{/images/wechat.png}" title="可以加我交流~"  class="ui rounded image" alt="哎呀 微信二维码摸鱼去啦" style="width: 110px"></a>
                </div>
            </div>
            -->
            <!--推荐博客-->
            <div class="five wide column">
                <h4 class="ui inverted header me-opacity-mini">部落文章</h4>
                <div id="newblog-container">
                    <div class="ui inverted link list" th:fragment="newblogList">
                        <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="item m-text-thin"
                           th:each="blog : ${newblogs}" th:text="${blog.title}"></a>
                    </div>
                </div>
            </div>
            <!--联系作者-->
            <div class="five wide column">
                <h4 class="ui inverted header me-opacity-mini">如何call我？</h4>
                <div class="ui inverted list link">
                    <p class="item">邮箱: 1249280779@qq.com</p>
                    <p class="item">QQ: 1249280779</p>
                    <p class="item">wechat: Ashely_cenxifan</p>
                    <a target="_blank" href="https://blog.csdn.net/cCENDD?spm=1000.2115.3001.5343" class="item">CSDN</a>
                </div>
            </div>
            <!--个人说明-->
            <div class="five wide column">
                <h4 class="ui inverted header me-opacity-mini">碎碎念~</h4>
                <div class="ui inverted list link">
                    <p class="item">世事繁杂</p>
                    <p class="item">我想和你</p>
                    <p class="item">过安稳的生活</p>
                </div>
            </div>
        </div>
        <div class="ui inverted section divider"></div>
        <div class="ui inverted list link">
            <p class="item">Copyright© 2022 Cen Designed by Cen_L_H</p>
            <p class="item"></p>
            <a class="item" target="_blank" href='#'>备案号</a>

        </div>
    </div>
</footer>

<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>

<script>

    // $('#newblog-container').load(/*[[@{/footer/newblog}]]*/"/footer/newblog");

    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide');
    });

    $('.ui.dropdown').dropdown({
        on: 'hover'
    });

    //消息提示关闭初始化
    $('.message .close')
        .on('click', function () {
            $(this)
                .closest('.message')
                .transition('fade');
        });
</script>

<!--Live-2D看板娘模型-->
<script src="https://eqcn.ajz.miesnfu.com/wp-content/plugins/wp-3d-pony/live2dw/lib/L2Dwidget.min.js"></script>

<!--Live-2D看板娘模型-->
<script type="text/javascript">
    //Live-2D看板娘模型
    L2Dwidget.init({
        model: {
            //jsonpath控制显示那个小萝莉模型，下面这个就是我觉得最可爱的小萝莉模型 //hijiki  //izumi //shizuku //koharu
            jsonPath: "https://unpkg.com/live2d-widget-model-koharu@1.0.5/assets/koharu.model.json", //这里改模型，前面后面都要改
            scale: 1,
        },
        display: {
            position: "left", //设置看板娘的上下左右位置
            width: 120,  //小萝莉的宽度
            height: 200, //小萝莉的高度
            hOffset: 65,  //水平偏移
            vOffset: -205  //垂直偏移
        },
        mobile: {
            show: false,  //在移动端不显示
            scale: 0.4    //移动设备上的缩放
        },
        react: {
            opacityDefault: 0.9, //设置透明度
            opacityOnHover: 0.2
        },
    });
</script>

<!--鼠标点击效果-->
<script type="text/javascript">
    var a_idx = 0;
    jQuery(document).ready(function ($) {
        $("body").click(function (e) {
            var a = new Array("富强", "民主", "文明", "和谐", "自由", "平等", "公正", "法治", "爱国", "敬业", "诚信", "友善", "社会主义好", "永远跟党走", "First Blood", "Double Kill", "Triple Kill", "Quadra Kill"
                , "Penta Kill");
            var $i = $("<span/>").text(a[a_idx]);
            a_idx = (a_idx + 1) % a.length;
            var x = e.pageX, y = e.pageY;
            $i.css({
                "z-index": 100000000,
                "top": y - 20,
                "left": x,
                "position": "absolute",
                "font-weight": "bold",
                "color": "#ef5b40"
            });
            $("body").append($i);
            $i.animate({"top": y - 180, "opacity": 0}, 1500, function () {
                $i.remove();
            });
        });
    });
</script>

</body>
</html>